apiready = function () {
  api.parseTapmode();
  FastClick.attach(document.body);
  var header = $api.byId('aui-header');
  $api.fixStatusBar(header);
  var pageNoti = new Vue({
      el: '#pageOrderDetail',
      data: {
        item:{},
        status:1,
      },
      created: function() {
        this.init();
      },
     methods: {
       init:function(){
       var that = this;
      //  var order_sn="20191162869851487d";// api.pageParam.order_sn;
      var order_sn = api.pageParam.order_sn;
       app.get("apiv2/order/find", {order_sn:order_sn} ,function(res){
         that.loading = 0;
         if (res.code != 200) {
           app.alert(res.msg);
           return;
         }
         that.item=res.data;
       })
      },
      refund:function(order_sn){
        var that = this;
        if(that.loading==1){
          return;
        }
        that.loading = 1;
        app.get("apiv2/order/refund", {order_sn:order_sn} ,function(res){
          that.loading = 0;
          if (res.code != 200) {
            app.alert(res.msg);
            return;
          }
          that.init();
        })
      }


     }
  })
}
